package pdfsetter.core.schema.selectors;

import java.util.Iterator;

import pdfsetter.core.schema.advanced.FilePageSelection;
import pdfsetter.core.util.RandomAccessIterableIterator;

/**
 * This class represents empty selection of pages from file, i.e. no pages at all.
 * 
 * @author Andrzej Dorobisz
 */
public class EmptyFilePageSelection implements FilePageSelection {
    @Override
    public Integer get(int index) {
        throw new IndexOutOfBoundsException();
    }

    @Override
    public int size() {
        return 0;
    }

    @Override
    public Iterator<Integer> iterator() {
        return new RandomAccessIterableIterator<Integer>(this);
    }
}
